// START SNIPPET: RecipeTypeDaoHibernate
package nothing.dao.hibernate;

import nothing.model.RecipeType;
import nothing.dao.RecipeTypeDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class RecipeTypeDaoHibernate extends GenericDaoHibernate<RecipeType, Long> implements RecipeTypeDao {

    public RecipeTypeDaoHibernate() {
        super(RecipeType.class);
    }

    @SuppressWarnings("unchecked")
    public List<RecipeType> findByRecipeName(String name) {
        return getHibernateTemplate().find("from RecipeType rt, Recipe r where rt.recipe=r and r.name=?", name);
    }
}
// START SNIPPET: RecipeTypeDaoHibernate

